package edu.sctu.practice.class02.lvchang.test13;

/**
 * Created by Administrator on 2015/10/16.
 */
public class TestConstructor {
    public int a, b;
    public double i, j, k;
    public String p, q;

    public TestConstructor(int a, int b) {
        System.out.println("a和b中较大的数为：" + (a > b ? a : b));
    }

    public TestConstructor(double i, double j, double k) {
        System.out.println("三个数的乘积为：" + (i * j * k));
    }

    public TestConstructor(String p, String q) {
        System.out.println("p和q是否相同：" + (p.equals(q)));
    }

    public static void main(String[] args) {

        TestConstructor testConstructor1 = new TestConstructor(12, 23);
        TestConstructor testConstructor2 = new TestConstructor(1.2, 2.3, 3.4);
        TestConstructor testConstructor3 = new TestConstructor("123", "123");

    }
}
